Skip to content
Open in github.dev Open in a new github.dev tab Open in codespace

FE-1857: Replace $UTV with @import in Watch#10748

Merged
zattoo-merge[bot] merged 5 commits intomasterfrom
feature/FE-1857-type-namespace-watch
Oct 28, 2025
Lines changed: 418 additions & 281 deletions

Pull Request Toolbar

Merged
FE-1857: Replace `$UTV` with `@import` in Watch#10748
zattoo-merge[bot] merged 5 commits intomasterfrom
feature/FE-1857-type-namespace-watch
0 / 55 viewed

Groups by Copilot

Grouping was skipped because all changes are closely related.

File tree

‎projects/utv/e2e/playwright/integration/watch/channels/toggle-active-group.test.js‎

Lines changed: 5 additions & 3 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -169,15 +169,15 @@ const setupMocks = async (page) => {
169
* @typedef {Object} TestScenario
169
* @typedef {Object} TestScenario
170
* @prop {string} description
170
* @prop {string} description
171
* @prop {{
171
* @prop {{
172-
* channelGroup: $UTV.Channels.ChannelGroupType | null,
172+
* channelGroup: Channels.ChannelGroupType | null,
173
* channelTitle: string,
173
* channelTitle: string,
174-
* initialActiveGroup: $UTV.Channels.ChannelGroupType,
174+
* initialActiveGroup: Channels.ChannelGroupType,
175
* programDetailsMock: $ZAPI.EPG.PowerDetailsResponse
175
* programDetailsMock: $ZAPI.EPG.PowerDetailsResponse
176
* }} setup
176
* }} setup
177
* @prop {{
177
* @prop {{
178
* channelNumber: string,
178
* channelNumber: string,
179
* notificationContent: string | null,
179
* notificationContent: string | null,
180-
* selectedGroup: $UTV.Channels.ChannelGroupType
180+
* selectedGroup: Channels.ChannelGroupType
181
* }} expected
181
* }} expected
182
*/
182
*/
183

183

@@ -351,3 +351,5 @@ test.describe('Active channel group', () => {
351
/**
351
/**
352
* @import {UniversalPage, ZAPIInterceptor} from '#utv/e2e/playwright/test/universal/interfaces'
352
* @import {UniversalPage, ZAPIInterceptor} from '#utv/e2e/playwright/test/universal/interfaces'
353
*/
353
*/
354+
355+
/** @import {Channels} from '#utv/watch/interfaces'; */

‎projects/utv/e2e/playwright/pages/watch/channel-list/index.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class ChannelList extends BasePage {
73
}
73
}
74

74

75
/**
75
/**
76-
* @param {$UTV.Channels.ChannelGroupType} channelGroup
76+
* @param {Channels.ChannelGroupType} channelGroup
77
*/
77
*/
78
async selectChannelGroup(channelGroup) {
78
async selectChannelGroup(channelGroup) {
79
// open the groups menu and go up a bunch to ensure favorites is selected
79
// open the groups menu and go up a bunch to ensure favorites is selected
@@ -104,7 +104,7 @@ export class ChannelList extends BasePage {
104
}
104
}
105

105

106
/**
106
/**
107-
* @param {$UTV.Channels.ChannelGroupType} channelGroup
107+
* @param {Channels.ChannelGroupType} channelGroup
108
* @returns {Promise<void>}
108
* @returns {Promise<void>}
109
*/
109
*/
110
async verifyChannelGroupSelected(channelGroup) {
110
async verifyChannelGroupSelected(channelGroup) {
@@ -117,3 +117,5 @@ export class ChannelList extends BasePage {
117
}
117
}
118
}
118
}
119
}
119
}
120+
121+
/** @import {Channels} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/channel-list/components/group-list/index.jsx‎

Lines changed: 6 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -97,5 +97,9 @@ export const ChannelListGroupList = (props) => {
97
);
97
);
98
};
98
};
99

99

100-
/** @import {Props} from './interfaces'; */
100+
/**
101-
/** @typedef {$RN.ListRenderItem<$UTV.ChannelList.GroupItem>} ListRenderItem */
101+
* @import {Props} from './interfaces';
102+
* @import {ChannelList} from '#utv/watch/interfaces';
103+
*/
104+
105+
/** @typedef {$RN.ListRenderItem<ChannelList.GroupItem>} ListRenderItem */

‎projects/utv/src/watch/channel-list/components/group-list/utils.js‎

Lines changed: 7 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -19,5 +19,10 @@
19
itemVisiblePercentThreshold: 90,
19
itemVisiblePercentThreshold: 90,
20
};
20
};
21

21

22-
/** @typedef {$UTV.Watch.ChannelList.GroupItem} GroupItem */
22+
/**
23-
/** @typedef {$UTV.UI.LongList.LongListProps<GroupItem>} ListProps */
23+
* @import {ChannelList} from '#utv/watch/interfaces';
24+
* @import {LongList} from '#utv/ui/interfaces';
25+
*/
26+
27+
/** @typedef {ChannelList.GroupItem} GroupItem */
28+
/** @typedef {LongList.LongListProps<GroupItem>} ListProps */
Code has comments. Press enter to view.

‎projects/utv/src/watch/channel-list/components/teaser-list/index.jsx‎

Lines changed: 7 additions & 3 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -120,7 +120,11 @@ export const ChannelListTeaserList = (props) => {
120
);
120
);
121
};
121
};
122

122

123+
/**
124+
* @import {Props} from './interfaces';
125+
* @import {LongList as LongListTypes} from '#utv/ui/interfaces';
126+
*/
127+
123
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */
128
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */
124-
/** @typedef {$UTV.UI.LongList.LongListProps<ChannelInfo>} ListProps */
129+
/** @typedef {LongListTypes.LongListProps<ChannelInfo>} ListProps */
125-
/** @typedef {$UTV.UI.LongList.ListRenderItem<ChannelInfo>} ListRenderItem */
130+
/** @typedef {LongListTypes.ListRenderItem<ChannelInfo>} ListRenderItem */
126-
/** @import {Props} from './interfaces'; */

‎projects/utv/src/watch/channel-list/components/teaser-list/utils.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -27,5 +27,7 @@ export const channelsKeyExtractor = (item) => {
27
return item.cid;
27
return item.cid;
28
};
28
};
29

29

30+
/** @import {LongList} from '#utv/ui/interfaces'; */
31+
30
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */
32
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */
31-
/** @typedef {$UTV.UI.LongList.LongListProps<ChannelInfo>} ListProps */
33+
/** @typedef {LongList.LongListProps<ChannelInfo>} ListProps */

‎projects/utv/src/watch/channel-list/components/teaser/components/live-time/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {styles} from './styles';
16
* @type {React.FC<Props>}
16
* @type {React.FC<Props>}
17
*/
17
*/
18
export const LiveTime = memo((props) => {
18
export const LiveTime = memo((props) => {
19-
/** @type {$UTV.UI.Flag.OrchestratorFlagConfig[]} */
19+
/** @type {Flag.OrchestratorFlagConfig[]} */
20
const flagsConfig = useMemo(() => {
20
const flagsConfig = useMemo(() => {
21
return [
21
return [
22
props.replayAvailable ? {
22
props.replayAvailable ? {
@@ -49,3 +49,5 @@ export const LiveTime = memo((props) => {
49
* @prop {number} endTime
49
* @prop {number} endTime
50
* @prop {boolean} replayAvailable
50
* @prop {boolean} replayAvailable
51
*/
51
*/
52+
53+
/** @import {Flag} from '#utv/ui/interfaces'; */

‎projects/utv/src/watch/channel-list/components/teaser/index.jsx‎

Lines changed: 5 additions & 3 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -194,8 +194,10 @@ export const ChannelListTeaser = memo((props) => {
194
);
194
);
195
});
195
});
196

196

197+
/** @import {ChannelList} from '#utv/watch/interfaces'; */
198+
197
/**
199
/**
198-
* @typedef {$UTV.ChannelList.Teaser.Props} TeaserProps
200+
* @typedef {ChannelList.Teaser.Props} TeaserProps
199-
* @typedef {$UTV.ChannelList.Teaser.FocusedProps} TeaserFocusedProps
201+
* @typedef {ChannelList.Teaser.FocusedProps} TeaserFocusedProps
200-
* @typedef {$UTV.ChannelList.Teaser.UnfocusedProps} TeaserUnfocusedProps
202+
* @typedef {ChannelList.Teaser.UnfocusedProps} TeaserUnfocusedProps
201
*/
203
*/

‎projects/utv/src/watch/channel-list/index.jsx‎

Lines changed: 7 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -281,7 +281,7 @@ export const ChannelList = () => {
281
setTimeoutActiveTrue,
281
setTimeoutActiveTrue,
282
);
282
);
283

283

284-
/** @type {$UTV.NCE.NCECallback} */
284+
/** @type {NCE.NCECallback} */
285
const handleNumericChannelEntry = useCallback((digits) => {
285
const handleNumericChannelEntry = useCallback((digits) => {
286
onNCEHandle(digits, {
286
onNCEHandle(digits, {
287
channelsListRef,
287
channelsListRef,
@@ -316,7 +316,7 @@ export const ChannelList = () => {
316
});
316
});
317
}, [onChannelPress]);
317
}, [onChannelPress]);
318

318

319-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
319+
/** @type {KeyHandler.KeyMapOptions} */
320
const keyMapOptions = useMemo(() => {
320
const keyMapOptions = useMemo(() => {
321
return {
321
return {
322
keyMap: {
322
keyMap: {
@@ -407,4 +407,9 @@ export const ChannelList = () => {
407
);
407
);
408
};
408
};
409

409

410+
/**
411+
* @import {NCE} from '#utv/watch/interfaces';
412+
* @import {KeyHandler} from '#utv/app/interfaces';
413+
*/
414+
410
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */
415
/** @typedef {$ZAPI.Channels.ChannelInfoV4} ChannelInfo */

‎projects/utv/src/watch/channel-list/utils.js‎

Lines changed: 8 additions & 6 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const getInitialFocusChannelIndex = (data, streamChannelId) => {
113
};
113
};
114

114

115
/**
115
/**
116-
* @param {$UTV.Watch.ChannelList.OnGroupParams} params
116+
* @param {ChannelList.OnGroupParams} params
117
* @param {number} nextGroupIndex
117
* @param {number} nextGroupIndex
118
*/
118
*/
119
const selectAndScrollToChannelBySelectingGroup = debounce((params, nextGroupIndex) => {
119
const selectAndScrollToChannelBySelectingGroup = debounce((params, nextGroupIndex) => {
@@ -140,7 +140,7 @@ const selectAndScrollToChannelBySelectingGroup = debounce((params, nextGroupInde
140
scrollToChannelOffset(params.channelsListRef, nextChannelIndex, false);
140
scrollToChannelOffset(params.channelsListRef, nextChannelIndex, false);
141
}, CHANNEL_SELECTION_DEBOUNCE_DELAY);
141
}, CHANNEL_SELECTION_DEBOUNCE_DELAY);
142

142

143-
/** @param {$UTV.Watch.ChannelList.OnGroupParams} params */
143+
/** @param {ChannelList.OnGroupParams} params */
144
export const onGroupUp = (params) => {
144
export const onGroupUp = (params) => {
145
params.setGroupIndex((prevGroupIndex) => {
145
params.setGroupIndex((prevGroupIndex) => {
146
if (prevGroupIndex <= CHANNEL_LIST_GROUPS_FAVORITES_ID) {
146
if (prevGroupIndex <= CHANNEL_LIST_GROUPS_FAVORITES_ID) {
@@ -155,7 +155,7 @@ export const onGroupUp = (params) => {
155
});
155
});
156
};
156
};
157

157

158-
/** @param {$UTV.Watch.ChannelList.OnGroupParams} params */
158+
/** @param {ChannelList.OnGroupParams} params */
159
export const onGroupDown = (params) => {
159
export const onGroupDown = (params) => {
160
params.setGroupIndex((prevGroupIndex) => {
160
params.setGroupIndex((prevGroupIndex) => {
161
if (prevGroupIndex >= params.groups.length - 1) {
161
if (prevGroupIndex >= params.groups.length - 1) {
@@ -234,7 +234,7 @@ export const onChannelDown = (setChannelIndex, channelsListRef, currentDataRef)
234
});
234
});
235
};
235
};
236

236

237-
/** @param {$UTV.Watch.ChannelList.OnRightParams} params */
237+
/** @param {ChannelList.OnRightParams} params */
238
export const onRight = (params) => {
238
export const onRight = (params) => {
239
if (params.isFavoritesSelectedRef.current) {
239
if (params.isFavoritesSelectedRef.current) {
240
params.activeGroupIndexRef.current = CHANNEL_LIST_GROUPS_FAVORITES_ID;
240
params.activeGroupIndexRef.current = CHANNEL_LIST_GROUPS_FAVORITES_ID;
@@ -259,7 +259,7 @@ export const onRight = (params) => {
259
});
259
});
260
};
260
};
261

261

262-
/** @param {$UTV.Watch.ChannelList.OnLeftParams} params */
262+
/** @param {ChannelList.OnLeftParams} params */
263
export const onLeft = (params) => {
263
export const onLeft = (params) => {
264
params.setIsGroupsInFocus((prevIsGroupsInFocus) => {
264
params.setIsGroupsInFocus((prevIsGroupsInFocus) => {
265
if (!prevIsGroupsInFocus) {
265
if (!prevIsGroupsInFocus) {
@@ -280,7 +280,7 @@ export const onLeft = (params) => {
280

280

281
/**
281
/**
282
* @param {string} digits
282
* @param {string} digits
283-
* @param {$UTV.Watch.ChannelList.OnNCEParams} params
283+
* @param {ChannelList.OnNCEParams} params
284
*/
284
*/
285
export const onNCEHandle = (digits, params) => {
285
export const onNCEHandle = (digits, params) => {
286
const channel = channelsLibUtils.getChannelByNumber(
286
const channel = channelsLibUtils.getChannelByNumber(
@@ -314,3 +314,5 @@ export const onNCEHandle = (digits, params) => {
314
scrollToChannelOffset(params.channelsListRef, nceChannelIndex, false);
314
scrollToChannelOffset(params.channelsListRef, nceChannelIndex, false);
315
}
315
}
316
};
316
};
317+
318+
/** @import {ChannelList} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/channels/actions.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -4,8 +4,8 @@ import * as sessionState from '#lib/session/state';
4

4

5
export const loadChannels = () => (
5
export const loadChannels = () => (
6
/**
6
/**
7-
* @param {$Redux.Dispatch<$UTV.Action>} _dispatch
7+
* @param {$Redux.Dispatch<Store.Action>} _dispatch
8-
* @param {$Redux.GetState<$UTV.State>} getState
8+
* @param {$Redux.GetState<Store.State>} getState
9
* @returns {Promise<$Lib.Channels.ChannelsData>}
9
* @returns {Promise<$Lib.Channels.ChannelsData>}
10
*/
10
*/
11
async (_dispatch, getState) => {
11
async (_dispatch, getState) => {
@@ -28,3 +28,5 @@ export const loadChannels = () => (
28
);
28
);
29

29

30
export {setChannels} from '#lib/channels/actions';
30
export {setChannels} from '#lib/channels/actions';
31+
32+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/channels/slice.js‎

Lines changed: 11 additions & 9 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const channelsSlice = createSlice({
47
},
47
},
48
initialState: {
48
initialState: {
49
favoritesActive: favoritesActiveSlice.getInitialState(),
49
favoritesActive: favoritesActiveSlice.getInitialState(),
50-
/** @type {$UTV.Watch.Channels.ChannelGroupType | null} */
50+
/** @type {Channels.ChannelGroupType | null} */
51
nextPlaybackChannelGroup: null,
51
nextPlaybackChannelGroup: null,
52
},
52
},
53
name: 'watch/channels',
53
name: 'watch/channels',
@@ -77,7 +77,7 @@ export const channelsSelectors = {
77
...sliceSelectors,
77
...sliceSelectors,
78

78

79
/**
79
/**
80-
* @param {$UTV.State} state
80+
* @param {Store.State} state
81
* @returns {$ZAPI.Channels.ChannelInfoV4[]}
81
* @returns {$ZAPI.Channels.ChannelInfoV4[]}
82
*/
82
*/
83
visibleChannelsGroup: (state) => {
83
visibleChannelsGroup: (state) => {
@@ -87,7 +87,7 @@ export const channelsSelectors = {
87
},
87
},
88

88

89
/**
89
/**
90-
* @param {$UTV.State} state
90+
* @param {Store.State} state
91
* @param {string} cid
91
* @param {string} cid
92
* @returns {string}
92
* @returns {string}
93
*/
93
*/
@@ -96,7 +96,7 @@ export const channelsSelectors = {
96
},
96
},
97

97

98
/**
98
/**
99-
* @param {$UTV.State} state
99+
* @param {Store.State} state
100
* @param {string} cid
100
* @param {string} cid
101
* @returns {boolean}
101
* @returns {boolean}
102
*/
102
*/
@@ -110,7 +110,7 @@ export const channelsSelectors = {
110
/**
110
/**
111
* @param {AppListenerEffectAPI} appListenerApi
111
* @param {AppListenerEffectAPI} appListenerApi
112
* @param {string} channelId
112
* @param {string} channelId
113-
* @param {$UTV.Watch.Channels.ChannelGroupType} [channelGroup]
113+
* @param {Channels.ChannelGroupType} [channelGroup]
114
*/
114
*/
115
const toggleChannelGroup = (appListenerApi, channelId, channelGroup) => {
115
const toggleChannelGroup = (appListenerApi, channelId, channelGroup) => {
116
const state = appListenerApi.getState();
116
const state = appListenerApi.getState();
@@ -153,11 +153,11 @@ export const registerChannelsMiddleware = () => {
153

153

154
effect: (action, listenerApi) => {
154
effect: (action, listenerApi) => {
155
const appListenerApi = /** @type {AppListenerEffectAPI} */ (listenerApi);
155
const appListenerApi = /** @type {AppListenerEffectAPI} */ (listenerApi);
156-
const state = /** @type {$UTV.State} */ (appListenerApi.getState());
156+
const state = /** @type {Store.State} */ (appListenerApi.getState());
157

157

158-
const typedAction = /** @type {$UTV.Watch.Player.Actions.SetPlayerData} */
158+
const typedAction = /** @type {Player.Actions.SetPlayerData} */
159
(/** @type {unknown} */ (action));
159
(/** @type {unknown} */ (action));
160-
const programDescriptor = /** @type {$UTV.Watch.Player.ProgramDescriptorWithID} */ (
160+
const programDescriptor = /** @type {Player.ProgramDescriptorWithID} */ (
161
typedAction.data?.state?.stream?.programDescriptor
161
typedAction.data?.state?.stream?.programDescriptor
162
);
162
);
163
const channelId = programDescriptor?.streamingProgram?.cid;
163
const channelId = programDescriptor?.streamingProgram?.cid;
@@ -181,7 +181,7 @@ export const registerChannelsMiddleware = () => {
181
listenerMiddleware.startListening({
181
listenerMiddleware.startListening({
182
type: FAVORITES_UPDATED,
182
type: FAVORITES_UPDATED,
183
effect: (_action, listenerApi) => {
183
effect: (_action, listenerApi) => {
184-
const state = /** @type {$UTV.State} */ (listenerApi.getState());
184+
const state = /** @type {Store.State} */ (listenerApi.getState());
185
const channelId = playerState.channelId(state);
185
const channelId = playerState.channelId(state);
186
const favoritesCID = channelsLibState.favoritesCID(state);
186
const favoritesCID = channelsLibState.favoritesCID(state);
187
const isFavoritesActive = channelsSelectors.selectFavoritesActive(state);
187
const isFavoritesActive = channelsSelectors.selectFavoritesActive(state);
@@ -194,5 +194,7 @@ export const registerChannelsMiddleware = () => {
194
};
194
};
195

195

196
/**
196
/**
197+
* @import {Store} from '#utv/app/interfaces'
197
* @import {AppListenerEffectAPI} from '#utv/app/store/interfaces'
198
* @import {AppListenerEffectAPI} from '#utv/app/store/interfaces'
199+
* @import {Channels, Player} from '#utv/watch/interfaces'
198
*/
200
*/

‎projects/utv/src/watch/feedback-overlay/actions.js‎

Lines changed: 7 additions & 3 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -18,12 +18,12 @@ import {
18
} from './enums';
18
} from './enums';
19

19

20
/**
20
/**
21-
* @param {$UTV.Watch.FeedbackOverlay.FeedbackOverlayAction} feedbackAction
21+
* @param {FeedbackOverlay.FeedbackOverlayAction} feedbackAction
22
*/
22
*/
23
export const emitAction = (feedbackAction) => (
23
export const emitAction = (feedbackAction) => (
24
/**
24
/**
25-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
25+
* @param {$Redux.Dispatch<Store.Action>} dispatch
26-
* @param {$Redux.GetState<$UTV.State>} getState
26+
* @param {$Redux.GetState<Store.State>} getState
27
*/
27
*/
28
(dispatch, getState) => {
28
(dispatch, getState) => {
29
const state = getState();
29
const state = getState();
@@ -73,3 +73,7 @@ export const emitAction = (feedbackAction) => (
73
}
73
}
74
}
74
}
75
);
75
);
76+
77+
/**
78+
* @import {Store} from '#utv/app/interfaces'
79+
* @import {FeedbackOverlay} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/feedback-overlay/constants.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const FEEDBACK_OVERLAY_ANIMATION_DURATION = 300;
8

8

9
/**
9
/**
10
* @type {Record<
10
* @type {Record<
11-
* $UTV.Watch.FeedbackOverlay.FeedbackOverlayAction,
11+
* FeedbackOverlay.FeedbackOverlayAction,
12-
* $UTV.Watch.FeedbackOverlay.FeedbackOverlayActionData
12+
* FeedbackOverlay.FeedbackOverlayActionData
13
* >}
13
* >}
14
*/
14
*/
15
export const FeedbackActions = {
15
export const FeedbackActions = {
@@ -44,3 +44,5 @@ export const FeedbackActions = {
44
soul: souls.FEEDBACK_OVERLAY_RESTART,
44
soul: souls.FEEDBACK_OVERLAY_RESTART,
45
},
45
},
46
};
46
};
47+
48+
/** @import {FeedbackOverlay} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/feedback-overlay/emitter.js‎

Lines changed: 3 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -3,8 +3,9 @@ import EventEmitter from 'eventemitter3';
3
/** @type {EventEmitterType} */
3
/** @type {EventEmitterType} */
4
export const FeedbackOverlayEventEmitter = new EventEmitter();
4
export const FeedbackOverlayEventEmitter = new EventEmitter();
5

5

6-
/** @typedef {EventEmitter<$UTV.Watch.FeedbackOverlay.EventTypes, unknown>} EventEmitterType */
7-
8
/**
6
/**
9
* @import {EventEmitter as EventEmitterType} from 'eventemitter3';
7
* @import {EventEmitter as EventEmitterType} from 'eventemitter3';
8+
* @import {FeedbackOverlay} from '#utv/watch/interfaces';
10
*/
9
*/
10+
11+
/** @typedef {EventEmitter<FeedbackOverlay.EventTypes, unknown>} EventEmitterType */

‎projects/utv/src/watch/feedback-overlay/index.jsx‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -29,13 +29,13 @@ import * as souls from './souls';
29

29

30
/** @type {React.FC} */
30
/** @type {React.FC} */
31
export const FeedbackOverlay = memo(() => {
31
export const FeedbackOverlay = memo(() => {
32-
/** @type {$UseState<$UTV.FeedbackOverlay.FeedbackOverlayActionData>} */
32+
/** @type {$UseState<FeedbackOverlayTypes.FeedbackOverlayActionData>} */
33
const [eventData, setEventData] = useState(null);
33
const [eventData, setEventData] = useState(null);
34
const animatedRef = useRef(new Animated.Value(0));
34
const animatedRef = useRef(new Animated.Value(0));
35

35

36
useEffect(() => {
36
useEffect(() => {
37
FeedbackOverlayEventEmitter.on(EventTypes.SET_ACTION, (action) => {
37
FeedbackOverlayEventEmitter.on(EventTypes.SET_ACTION, (action) => {
38-
/** @type {$UTV.FeedbackOverlay.FeedbackOverlayAction} */
38+
/** @type {FeedbackOverlayTypes.FeedbackOverlayAction} */
39
const nextAction = action;
39
const nextAction = action;
40

40

41
setEventData(FeedbackActions[nextAction]);
41
setEventData(FeedbackActions[nextAction]);
@@ -92,3 +92,5 @@ export const FeedbackOverlay = memo(() => {
92
</Animated.View>
92
</Animated.View>
93
);
93
);
94
});
94
});
95+
96+
/** @import {FeedbackOverlay as FeedbackOverlayTypes} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/feedback-overlay/utils.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const scaleInterpolation = {
28
};
28
};
29

29

30
/**
30
/**
31-
* @param {$UTV.Watch.FeedbackOverlay.FeedbackOverlayAction} action
31+
* @param {FeedbackOverlay.FeedbackOverlayAction} action
32
* @param {$Playback.UTVPlayerState} playerState
32
* @param {$Playback.UTVPlayerState} playerState
33
* @returns {boolean}
33
* @returns {boolean}
34
*/
34
*/
@@ -50,3 +50,5 @@ export const isFeedbackActionAllowed = (action, playerState) => {
50
return false;
50
return false;
51
}
51
}
52
};
52
};
53+
54+
/** @import {FeedbackOverlay} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/menu/hooks/use-menu-open-gesture/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {EventTypes} from '#utv/app/focus/handler/enums';
16
export const useMenuOpenGesture = (disabled) => {
16
export const useMenuOpenGesture = (disabled) => {
17
const lastFocusTimeRef = useRef(0);
17
const lastFocusTimeRef = useRef(0);
18

18

19-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
19+
/** @type {KeyHandler.KeyMapOptions} */
20
const keyMapOptions = useMemo(() => {
20
const keyMapOptions = useMemo(() => {
21
return {
21
return {
22
keyMap: {
22
keyMap: {
@@ -45,3 +45,5 @@ export const useMenuOpenGesture = (disabled) => {
45
useAppKeyHandler(keyMapOptions, disabled);
45
useAppKeyHandler(keyMapOptions, disabled);
46
useFocusHandler(focusEventsMapOptions, disabled);
46
useFocusHandler(focusEventsMapOptions, disabled);
47
};
47
};
48+
49+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/menu/hooks/use-menu-open-gesture/index.kepler.jsx‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const useMenuOpenGesture = (disabled) => {
22

22

23
const lastFocusTimeRef = useRef(0);
23
const lastFocusTimeRef = useRef(0);
24

24

25-
/** @type {$UTV.KeyHandler.KeyCallback} */
25+
/** @type {KeyHandler.KeyCallback} */
26
const onAnyKeyPress = useCallback((event) => {
26
const onAnyKeyPress = useCallback((event) => {
27
const nextTag = FocusManager.getFocused();
27
const nextTag = FocusManager.getFocused();
28

28

@@ -37,7 +37,7 @@ export const useMenuOpenGesture = (disabled) => {
37
lastTagRef.current = nextTag;
37
lastTagRef.current = nextTag;
38
}, []);
38
}, []);
39

39

40-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
40+
/** @type {KeyHandler.KeyMapOptions} */
41
const keyMapOptions = useMemo(() => {
41
const keyMapOptions = useMemo(() => {
42
return {
42
return {
43
onAnyKey: onAnyKeyPress,
43
onAnyKey: onAnyKeyPress,
@@ -59,3 +59,5 @@ export const useMenuOpenGesture = (disabled) => {
59
/**
59
/**
60
* @import {TargetType} from '#utv/app/focus/handler/interfaces';
60
* @import {TargetType} from '#utv/app/focus/handler/interfaces';
61
*/
61
*/
62+
63+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/menu/data.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const menuDefaultOrder = [
118
];
118
];
119

119

120
/**
120
/**
121-
* @type {Partial<Record<$UTV.Context.Funnel, string>>}
121+
* @type {Partial<Record<Context.Funnel, string>>}
122
*/
122
*/
123
export const funnelMenuItemMap = {
123
export const funnelMenuItemMap = {
124
[Funnel.CHANNELS]: MenuItem.CHANNELS,
124
[Funnel.CHANNELS]: MenuItem.CHANNELS,
@@ -135,3 +135,5 @@ export const funnelMenuItemMap = {
135
};
135
};
136

136

137
/** @import {MenuDataItem} from './interfaces'; */
137
/** @import {MenuDataItem} from './interfaces'; */
138+
139+
/** @import {Context} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/menu/index.jsx‎

Lines changed: 5 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const Menu = () => {
154
}
154
}
155
}, [homeId]);
155
}, [homeId]);
156

156

157-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
157+
/** @type {KeyHandler.KeyMapOptions} */
158
const keyMapOptions = useMemo(() => {
158
const keyMapOptions = useMemo(() => {
159
return {
159
return {
160
keyMap: {
160
keyMap: {
@@ -217,4 +217,7 @@ export const Menu = () => {
217
);
217
);
218
};
218
};
219

219

220-
/** @import {MenuDataItem} from './interfaces'; */
220+
/**
221+
* @import {MenuDataItem} from './interfaces';
222+
* @import {KeyHandler} from '#utv/app/interfaces';
223+
*/

‎projects/utv/src/watch/numeric-channel-entry/hook/index.jsx‎

Lines changed: 5 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -7,12 +7,12 @@ import {navigationRef} from '#utv/app/navigation';
7
import {NUMERIC_CHANNEL_ENTRY_PAGE} from '../paths';
7
import {NUMERIC_CHANNEL_ENTRY_PAGE} from '../paths';
8

8

9
/**
9
/**
10-
* @param {$UTV.NCE.NCECallback} callback
10+
* @param {NCE.NCECallback} callback
11
* @param {boolean} [disabled]
11
* @param {boolean} [disabled]
12
* @returns {void}
12
* @returns {void}
13
*/
13
*/
14
export const useNumericChannelEntry = (callback, disabled) => {
14
export const useNumericChannelEntry = (callback, disabled) => {
15-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
15+
/** @type {KeyHandler.KeyMapOptions} */
16
const keyMapOptions = useMemo(() => {
16
const keyMapOptions = useMemo(() => {
17
/** @type {(initialNumber: number) => void} */
17
/** @type {(initialNumber: number) => void} */
18
const navigateToNCE = (initialNumber) => {
18
const navigateToNCE = (initialNumber) => {
@@ -40,3 +40,6 @@ export const useNumericChannelEntry = (callback, disabled) => {
40

40

41
useKeyHandler(keyMapOptions, disabled);
41
useKeyHandler(keyMapOptions, disabled);
42
};
42
};
43+
44+
/** @import {NCE} from '#utv/watch/interfaces'; */
45+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/numeric-channel-entry/index.jsx‎

Lines changed: 5 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const NumericChannelEntry = (props) => {
78
});
78
});
79
}, [triggerAction]);
79
}, [triggerAction]);
80

80

81-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
81+
/** @type {KeyHandler.KeyMapOptions} */
82
const keyMapOptions = useMemo(() => {
82
const keyMapOptions = useMemo(() => {
83
return {
83
return {
84
keyMap: {
84
keyMap: {
@@ -138,4 +138,7 @@ export const NumericChannelEntry = (props) => {
138
);
138
);
139
};
139
};
140

140

141-
/** @import {Props} from './interfaces' */
141+
/**
142+
* @import {Props} from './interfaces'
143+
* @import {KeyHandler} from '#utv/app/interfaces';
144+
*/

‎projects/utv/src/watch/osd/components/audio-subtitle-dialogue/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const AudioSubtitleDialogue = () => {
83
navigation.goBack();
83
navigation.goBack();
84
}, [navigation, setSubtitleTrack]);
84
}, [navigation, setSubtitleTrack]);
85

85

86-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
86+
/** @type {KeyHandler.KeyMapOptions} */
87
const keyMapOptions = useMemo(() => {
87
const keyMapOptions = useMemo(() => {
88
return {
88
return {
89
keyMap: {
89
keyMap: {
@@ -133,3 +133,5 @@ export const AudioSubtitleDialogue = () => {
133
</View>
133
</View>
134
);
134
);
135
};
135
};
136+
137+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/osd/components/next-program/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const NextProgram = () => {
31
const currentProgram = useSelector(playerState.streamingProgram);
31
const currentProgram = useSelector(playerState.streamingProgram);
32
const streamType = useSelector(playerState.streamType);
32
const streamType = useSelector(playerState.streamType);
33
const lineupHash = useSelector(sessionState.luhash);
33
const lineupHash = useSelector(sessionState.luhash);
34-
const upcomingProgram = useSelector((/** @type {$UTV.State} */ state) => {
34+
const upcomingProgram = useSelector((/** @type {Store.State} */ state) => {
35
if (!cid) {
35
if (!cid) {
36
return null;
36
return null;
37
}
37
}
@@ -85,3 +85,5 @@ export const NextProgram = () => {
85
</View>
85
</View>
86
);
86
);
87
};
87
};
88+
89+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/osd/components/toolbar/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const Toolbar = (props) => {
104
* @prop {VoidFunction} onRestartPress
104
* @prop {VoidFunction} onRestartPress
105
* @prop {VoidFunction} onLivePress
105
* @prop {VoidFunction} onLivePress
106
* @prop {VoidFunction} onInfoPress
106
* @prop {VoidFunction} onInfoPress
107-
* @prop {$UTV.Recordings.ControlConfig} recordingControl
107+
* @prop {Recordings.ControlConfig} recordingControl
108
* @prop {boolean} hasReplay
108
* @prop {boolean} hasReplay
109
* @prop {boolean} hasLive
109
* @prop {boolean} hasLive
110
* @prop {boolean} hasRecording
110
* @prop {boolean} hasRecording
@@ -114,3 +114,5 @@ export const Toolbar = (props) => {
114
* @prop {VoidFunction} onInfoButtonFocus
114
* @prop {VoidFunction} onInfoButtonFocus
115
* @prop {$Playback.UTVPlayerStreamType} streamType
115
* @prop {$Playback.UTVPlayerStreamType} streamType
116
*/
116
*/
117+
118+
/** @import {Recordings} from '#utv/user/interfaces'; */

‎projects/utv/src/watch/osd/full/index.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -218,7 +218,7 @@ export const FullOSD = () => {
218
ultraFastHandler: () => seekForward(SEEK_ULTRA_FAST_FORWARD_STEP_COUNT),
218
ultraFastHandler: () => seekForward(SEEK_ULTRA_FAST_FORWARD_STEP_COUNT),
219
});
219
});
220

220

221-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
221+
/** @type {KeyHandler.KeyMapOptions} */
222
const keyMapOptions = useMemo(() => {
222
const keyMapOptions = useMemo(() => {
223
const canKeyUpCanCloseOSD =
223
const canKeyUpCanCloseOSD =
224
// UP event when focus is on ProgressBar and theres no skipAdButton
224
// UP event when focus is on ProgressBar and theres no skipAdButton
@@ -365,3 +365,5 @@ export const FullOSD = () => {
365
</AnimatedOverlay>
365
</AnimatedOverlay>
366
);
366
);
367
};
367
};
368+
369+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/osd/hooks/use-multi-level-accelerated-long-press-handler.jsx‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const useMultiLevelAcceleratedLongPressHandler = (params) => {
95
};
95
};
96
}, []));
96
}, []));
97

97

98-
const keyHandler = useCallback((/** @type {$UTV.KeyHandler.TvKeyEvent} */ evt) => {
98+
const keyHandler = useCallback((/** @type {KeyHandler.TvKeyEvent} */ evt) => {
99
if (evt.type === KeyEventTypes.KEY_DOWN) {
99
if (evt.type === KeyEventTypes.KEY_DOWN) {
100
if (extFuncOnKeyDown) {
100
if (extFuncOnKeyDown) {
101
extFuncOnKeyDown();
101
extFuncOnKeyDown();
@@ -157,3 +157,5 @@ export const useMultiLevelAcceleratedLongPressHandler = (params) => {
157
predictedCurrentMs,
157
predictedCurrentMs,
158
};
158
};
159
};
159
};
160+
161+
/** @import {KeyHandler} from '#utv/app/interfaces'; */

‎projects/utv/src/watch/player/actions/index.js‎

Lines changed: 68 additions & 65 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const getBufferedPlay = () => {
78
};
78
};
79

79

80
/**
80
/**
81-
* @param {$UTV.State} state
81+
* @param {Store.State} state
82
* @returns {boolean}
82
* @returns {boolean}
83
*/
83
*/
84
const isPlayerReady = (state) => {
84
const isPlayerReady = (state) => {
@@ -88,7 +88,7 @@ const isPlayerReady = (state) => {
88
};
88
};
89

89

90
/**
90
/**
91-
* @param {$UTV.State} state
91+
* @param {Store.State} state
92
* @returns {Partial<$Playback.UTVPlayerPlayOptions>}
92
* @returns {Partial<$Playback.UTVPlayerPlayOptions>}
93
*/
93
*/
94
const getBaseOptions = (state) => {
94
const getBaseOptions = (state) => {
@@ -103,7 +103,7 @@ const getBaseOptions = (state) => {
103
};
103
};
104

104

105
/**
105
/**
106-
* @param {$UTV.State} state
106+
* @param {Store.State} state
107
* @returns {boolean}
107
* @returns {boolean}
108
*/
108
*/
109
export const isPlaybackActiveOrPlayRequested = (state) => {
109
export const isPlaybackActiveOrPlayRequested = (state) => {
@@ -121,8 +121,8 @@ export const isPlaybackActiveOrPlayRequested = (state) => {
121
*/
121
*/
122
const confirmUnsyncStreamLeave = (action) => (
122
const confirmUnsyncStreamLeave = (action) => (
123
/**
123
/**
124-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
124+
* @param {$Redux.Dispatch<Store.Action>} dispatch
125-
* @param {$Redux.GetState<$UTV.State>} getState
125+
* @param {$Redux.GetState<Store.State>} getState
126
*/
126
*/
127
(dispatch, getState) => {
127
(dispatch, getState) => {
128
const state = getState();
128
const state = getState();
@@ -147,13 +147,13 @@ const confirmUnsyncStreamLeave = (action) => (
147
);
147
);
148

148

149
/**
149
/**
150-
* @param {$UTV.Watch.Player.PlayLiveOptions} options
150+
* @param {Player.PlayLiveOptions} options
151-
* @param {$UTV.Watch.Player.PlayAdditionalArgs} [additionalArgs]
151+
* @param {Player.PlayAdditionalArgs} [additionalArgs]
152
*/
152
*/
153
export const playLive = (options, additionalArgs = {}) => (
153
export const playLive = (options, additionalArgs = {}) => (
154
/**
154
/**
155-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
155+
* @param {$Redux.Dispatch<Store.Action>} dispatch
156-
* @param {$Redux.GetState<$UTV.State>} getState
156+
* @param {$Redux.GetState<Store.State>} getState
157
*/
157
*/
158
async (dispatch, getState) => {
158
async (dispatch, getState) => {
159
if (additionalArgs.showFeedback) {
159
if (additionalArgs.showFeedback) {
@@ -221,8 +221,8 @@ export const playLive = (options, additionalArgs = {}) => (
221

221

222
export const handleStreamError = () => (
222
export const handleStreamError = () => (
223
/**
223
/**
224-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
224+
* @param {$Redux.Dispatch<Store.Action>} dispatch
225-
* @param {$Redux.GetState<$UTV.State>} getState
225+
* @param {$Redux.GetState<Store.State>} getState
226
*/
226
*/
227
(dispatch, getState) => {
227
(dispatch, getState) => {
228
const state = getState();
228
const state = getState();
@@ -264,12 +264,12 @@ export const handleStreamError = () => (
264
});
264
});
265

265

266
/**
266
/**
267-
* @param {$UTV.Watch.Player.PlayReplayOptions} options
267+
* @param {Player.PlayReplayOptions} options
268
*/
268
*/
269
export const playReplay = (options) => (
269
export const playReplay = (options) => (
270
/**
270
/**
271-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
271+
* @param {$Redux.Dispatch<Store.Action>} dispatch
272-
* @param {$Redux.GetState<$UTV.State>} getState
272+
* @param {$Redux.GetState<Store.State>} getState
273
*/
273
*/
274
async (dispatch, getState) => {
274
async (dispatch, getState) => {
275
const state = getState();
275
const state = getState();
@@ -351,12 +351,12 @@ export const playReplay = (options) => (
351
});
351
});
352

352

353
/**
353
/**
354-
* @param {$UTV.Watch.Player.PlayRecordingOptions} options
354+
* @param {Player.PlayRecordingOptions} options
355
*/
355
*/
356
export const playRecording = (options) => (
356
export const playRecording = (options) => (
357
/**
357
/**
358-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
358+
* @param {$Redux.Dispatch<Store.Action>} dispatch
359-
* @param {$Redux.GetState<$UTV.State>} getState
359+
* @param {$Redux.GetState<Store.State>} getState
360
*/
360
*/
361
async (dispatch, getState) => {
361
async (dispatch, getState) => {
362
const state = getState();
362
const state = getState();
@@ -449,12 +449,12 @@ export const playRecording = (options) => (
449
});
449
});
450

450

451
/**
451
/**
452-
* @param {$UTV.Watch.Player.PlayVodOptions} options
452+
* @param {Player.PlayVodOptions} options
453
*/
453
*/
454
export const playVodMovie = (options) => (
454
export const playVodMovie = (options) => (
455
/**
455
/**
456-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
456+
* @param {$Redux.Dispatch<Store.Action>} dispatch
457-
* @param {$Redux.GetState<$UTV.State>} getState
457+
* @param {$Redux.GetState<Store.State>} getState
458
*/
458
*/
459
async (dispatch, getState) => {
459
async (dispatch, getState) => {
460
const appDispatch = /** @type {AppDispatch} */ (dispatch);
460
const appDispatch = /** @type {AppDispatch} */ (dispatch);
@@ -525,12 +525,12 @@ export const playVodMovie = (options) => (
525
});
525
});
526

526

527
/**
527
/**
528-
* @param {$UTV.Watch.Player.PlayVodOptions} options
528+
* @param {Player.PlayVodOptions} options
529
*/
529
*/
530
export const playVodEpisode = (options) => (
530
export const playVodEpisode = (options) => (
531
/**
531
/**
532-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
532+
* @param {$Redux.Dispatch<Store.Action>} dispatch
533-
* @param {$Redux.GetState<$UTV.State>} getState
533+
* @param {$Redux.GetState<Store.State>} getState
534
*/
534
*/
535
async (dispatch, getState) => {
535
async (dispatch, getState) => {
536
const state = getState();
536
const state = getState();
@@ -611,7 +611,7 @@ export const playVodEpisode = (options) => (
611

611

612
export const play = () => (
612
export const play = () => (
613
/**
613
/**
614-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
614+
* @param {$Redux.Dispatch<Store.Action>} dispatch
615
*/
615
*/
616
(dispatch) => {
616
(dispatch) => {
617
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.PLAY));
617
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.PLAY));
@@ -648,8 +648,8 @@ export const trackPauseAdTenSecondsDisplayed = () => (
648
*/
648
*/
649
export const pause = (autoPause) => (
649
export const pause = (autoPause) => (
650
/**
650
/**
651-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
651+
* @param {$Redux.Dispatch<Store.Action>} dispatch
652-
* @param {$Redux.GetState<$UTV.State>} getState
652+
* @param {$Redux.GetState<Store.State>} getState
653
*/
653
*/
654
(dispatch, getState) => {
654
(dispatch, getState) => {
655
if (!autoPause) {
655
if (!autoPause) {
@@ -666,8 +666,8 @@ export const pause = (autoPause) => (
666

666

667
export const pauseOrStopPlayback = () => (
667
export const pauseOrStopPlayback = () => (
668
/**
668
/**
669-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
669+
* @param {$Redux.Dispatch<Store.Action>} dispatch
670-
* @param {$Redux.GetState<$UTV.State>} getState
670+
* @param {$Redux.GetState<Store.State>} getState
671
*/
671
*/
672
(dispatch, getState) => {
672
(dispatch, getState) => {
673
const state = getState();
673
const state = getState();
@@ -684,8 +684,8 @@ export const pauseOrStopPlayback = () => (
684

684

685
export const playPause = () => (
685
export const playPause = () => (
686
/**
686
/**
687-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
687+
* @param {$Redux.Dispatch<Store.Action>} dispatch
688-
* @param {$Redux.GetState<$UTV.State>} getState
688+
* @param {$Redux.GetState<Store.State>} getState
689
*/
689
*/
690
(dispatch, getState) => {
690
(dispatch, getState) => {
691
const state = getState();
691
const state = getState();
@@ -702,8 +702,8 @@ export const playPause = () => (
702

702

703
export const playFromStart = () => (
703
export const playFromStart = () => (
704
/**
704
/**
705-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
705+
* @param {$Redux.Dispatch<Store.Action>} dispatch
706-
* @param {$Redux.GetState<$UTV.State>} getState
706+
* @param {$Redux.GetState<Store.State>} getState
707
*/
707
*/
708
(dispatch, getState) => {
708
(dispatch, getState) => {
709
const state = getState();
709
const state = getState();
@@ -742,7 +742,7 @@ export const playFromStart = () => (
742

742

743
export const seekForward = (seekStep = SEEK_FORWARD_STEP_COUNT) => (
743
export const seekForward = (seekStep = SEEK_FORWARD_STEP_COUNT) => (
744
/**
744
/**
745-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
745+
* @param {$Redux.Dispatch<Store.Action>} dispatch
746
*/
746
*/
747
(dispatch) => {
747
(dispatch) => {
748
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.FORWARD));
748
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.FORWARD));
@@ -752,7 +752,7 @@ export const seekForward = (seekStep = SEEK_FORWARD_STEP_COUNT) => (
752

752

753
export const seekBackward = (seekStep = SEEK_BACKWARD_STEP_COUNT) => (
753
export const seekBackward = (seekStep = SEEK_BACKWARD_STEP_COUNT) => (
754
/**
754
/**
755-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
755+
* @param {$Redux.Dispatch<Store.Action>} dispatch
756
*/
756
*/
757
(dispatch) => {
757
(dispatch) => {
758
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.BACKWARD));
758
dispatch(feedbackOverlayActions.emitAction(FeedbackOverlayAction.BACKWARD));
@@ -775,8 +775,8 @@ export const seekToAdBreakEnd = () => (
775
*/
775
*/
776
export const setSubtitleTrack = (trackId) => (
776
export const setSubtitleTrack = (trackId) => (
777
/**
777
/**
778-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
778+
* @param {$Redux.Dispatch<Store.Action>} dispatch
779-
* @param {$Redux.GetState<$UTV.State>} getState
779+
* @param {$Redux.GetState<Store.State>} getState
780
*/
780
*/
781
(dispatch, getState) => {
781
(dispatch, getState) => {
782
const state = getState();
782
const state = getState();
@@ -796,8 +796,8 @@ export const setSubtitleTrack = (trackId) => (
796
*/
796
*/
797
export const setAudioTrack = (trackId) => (
797
export const setAudioTrack = (trackId) => (
798
/**
798
/**
799-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
799+
* @param {$Redux.Dispatch<Store.Action>} dispatch
800-
* @param {$Redux.GetState<$UTV.State>} getState
800+
* @param {$Redux.GetState<Store.State>} getState
801
*/
801
*/
802
(dispatch, getState) => {
802
(dispatch, getState) => {
803
const state = getState();
803
const state = getState();
@@ -819,7 +819,7 @@ export const setAudioTrack = (trackId) => (
819

819

820
/**
820
/**
821
* @param {$Playback.UTVPlayerEventData} data
821
* @param {$Playback.UTVPlayerEventData} data
822-
* @returns {$UTV.Watch.Player.Actions.SetPlayerData}
822+
* @returns {Player.Actions.SetPlayerData}
823
*/
823
*/
824
export const setPlayerData = (data) => {
824
export const setPlayerData = (data) => {
825
return {
825
return {
@@ -829,7 +829,7 @@ export const setPlayerData = (data) => {
829
};
829
};
830

830

831
/**
831
/**
832-
* @returns {$UTV.Watch.Player.Actions.PlayerDestroy}
832+
* @returns {Player.Actions.PlayerDestroy}
833
*/
833
*/
834
export const playerDestroy = () => {
834
export const playerDestroy = () => {
835
return {
835
return {
@@ -838,7 +838,7 @@ export const playerDestroy = () => {
838
};
838
};
839

839

840
/**
840
/**
841-
* @param {$UTV.State} state
841+
* @param {Store.State} state
842
* @param {number} positionSwitchNumber
842
* @param {number} positionSwitchNumber
843
* @returns {string | null}
843
* @returns {string | null}
844
*/
844
*/
@@ -867,8 +867,8 @@ const getNextChannelId = (state, positionSwitchNumber) => {
867
*/
867
*/
868
export const zapDirection = (direction) => (
868
export const zapDirection = (direction) => (
869
/**
869
/**
870-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
870+
* @param {$Redux.Dispatch<Store.Action>} dispatch
871-
* @param {$Redux.GetState<$UTV.State>} getState
871+
* @param {$Redux.GetState<Store.State>} getState
872
*/
872
*/
873
(dispatch, getState) => {
873
(dispatch, getState) => {
874
const state = getState();
874
const state = getState();
@@ -889,8 +889,8 @@ export const zapDirection = (direction) => (
889
*/
889
*/
890
export const playFromPreviousState = (pin) => (
890
export const playFromPreviousState = (pin) => (
891
/**
891
/**
892-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
892+
* @param {$Redux.Dispatch<Store.Action>} dispatch
893-
* @param {$Redux.GetState<$UTV.State>} getState
893+
* @param {$Redux.GetState<Store.State>} getState
894
*/
894
*/
895
(dispatch, getState) => {
895
(dispatch, getState) => {
896
const state = getState();
896
const state = getState();
@@ -978,8 +978,8 @@ export const playFromPreviousState = (pin) => (
978
*/
978
*/
979
export const zapNumeric = (channelNumber) => (
979
export const zapNumeric = (channelNumber) => (
980
/**
980
/**
981-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
981+
* @param {$Redux.Dispatch<Store.Action>} dispatch
982-
* @param {$Redux.GetState<$UTV.State>} getState
982+
* @param {$Redux.GetState<Store.State>} getState
983
*/
983
*/
984
(dispatch, getState) => {
984
(dispatch, getState) => {
985
const state = getState();
985
const state = getState();
@@ -1027,8 +1027,8 @@ const LIVE_AND_TIMESHIFT = [
1027
*/
1027
*/
1028
export const playLiveFromDeepLink = (cid) => (
1028
export const playLiveFromDeepLink = (cid) => (
1029
/**
1029
/**
1030-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1030+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1031-
* @param {$Redux.GetState<$UTV.State>} getState
1031+
* @param {$Redux.GetState<Store.State>} getState
1032
*/
1032
*/
1033
(dispatch, getState) => {
1033
(dispatch, getState) => {
1034
const state = getState();
1034
const state = getState();
@@ -1052,8 +1052,8 @@ export const playLiveFromDeepLink = (cid) => (
1052
*/
1052
*/
1053
export const playReplayFromDeepLink = (cid, pid) => (
1053
export const playReplayFromDeepLink = (cid, pid) => (
1054
/**
1054
/**
1055-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1055+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1056-
* @param {$Redux.GetState<$UTV.State>} getState
1056+
* @param {$Redux.GetState<Store.State>} getState
1057
*/
1057
*/
1058
(dispatch, getState) => {
1058
(dispatch, getState) => {
1059
const state = getState();
1059
const state = getState();
@@ -1078,8 +1078,8 @@ export const playReplayFromDeepLink = (cid, pid) => (
1078
*/
1078
*/
1079
export const playRecordingFromDeepLink = (recordingId) => (
1079
export const playRecordingFromDeepLink = (recordingId) => (
1080
/**
1080
/**
1081-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1081+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1082-
* @param {$Redux.GetState<$UTV.State>} getState
1082+
* @param {$Redux.GetState<Store.State>} getState
1083
*/
1083
*/
1084
(dispatch, getState) => {
1084
(dispatch, getState) => {
1085
const state = getState();
1085
const state = getState();
@@ -1108,8 +1108,8 @@ export const playRecordingFromDeepLink = (recordingId) => (
1108
*/
1108
*/
1109
export const playVodEpisodeFromDeepLink = (episodeId) => (
1109
export const playVodEpisodeFromDeepLink = (episodeId) => (
1110
/**
1110
/**
1111-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1111+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1112-
* @param {$Redux.GetState<$UTV.State>} getState
1112+
* @param {$Redux.GetState<Store.State>} getState
1113
*/
1113
*/
1114
(dispatch, getState) => {
1114
(dispatch, getState) => {
1115
const state = getState();
1115
const state = getState();
@@ -1139,8 +1139,8 @@ export const playVodEpisodeFromDeepLink = (episodeId) => (
1139
*/
1139
*/
1140
export const playVodMovieFromDeepLink = (movieId) => (
1140
export const playVodMovieFromDeepLink = (movieId) => (
1141
/**
1141
/**
1142-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1142+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1143-
* @param {$Redux.GetState<$UTV.State>} getState
1143+
* @param {$Redux.GetState<Store.State>} getState
1144
*/
1144
*/
1145
(dispatch, getState) => {
1145
(dispatch, getState) => {
1146
const state = getState();
1146
const state = getState();
@@ -1167,8 +1167,8 @@ export const playVodMovieFromDeepLink = (movieId) => (
1167

1167

1168
export const cueNext = () => (
1168
export const cueNext = () => (
1169
/**
1169
/**
1170-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1170+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1171-
* @param {$Redux.GetState<$UTV.State>} getState
1171+
* @param {$Redux.GetState<Store.State>} getState
1172
*/
1172
*/
1173
async (dispatch, getState) => {
1173
async (dispatch, getState) => {
1174
const state = getState();
1174
const state = getState();
@@ -1271,12 +1271,12 @@ export const cueNext = () => (
1271
);
1271
);
1272

1272

1273
/**
1273
/**
1274-
* @param {$UTV.Watch.Player.StreamPathData} [data]
1274+
* @param {Player.StreamPathData} [data]
1275
*/
1275
*/
1276
export const navigateToStream = (data) => (
1276
export const navigateToStream = (data) => (
1277
/**
1277
/**
1278-
* @param {$Redux.Dispatch<$UTV.Action>} _dispatch
1278+
* @param {$Redux.Dispatch<Store.Action>} _dispatch
1279-
* @param {$Redux.GetState<$UTV.State>} getState
1279+
* @param {$Redux.GetState<Store.State>} getState
1280
*/
1280
*/
1281
(_dispatch, getState) => {
1281
(_dispatch, getState) => {
1282
const navigationState = navigationRef.getState();
1282
const navigationState = navigationRef.getState();
@@ -1358,7 +1358,7 @@ export const setStatsForNerds = (enabled) => (
1358

1358

1359
/**
1359
/**
1360
* @param {boolean} enabled
1360
* @param {boolean} enabled
1361-
* @returns {$Redux.Dispatch<$UTV.Action>}
1361+
* @returns {$Redux.Dispatch<Store.Action>}
1362
*/
1362
*/
1363
export const setPersistentOsd = (enabled) => {
1363
export const setPersistentOsd = (enabled) => {
1364
return storageActions.setItem(StorageKey.PERSISTENT_OSD, enabled);
1364
return storageActions.setItem(StorageKey.PERSISTENT_OSD, enabled);
@@ -1368,10 +1368,13 @@ export * from '../messages/actions';
1368

1368

1369
/**
1369
/**
1370
* @callback Action
1370
* @callback Action
1371-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
1371+
* @param {$Redux.Dispatch<Store.Action>} dispatch
1372-
* @param {$Redux.GetState<$UTV.State>} getState
1372+
* @param {$Redux.GetState<Store.State>} getState
1373
*/
1373
*/
1374

1374

1375
/**
1375
/**
1376+
* @import {Store} from '#utv/app/interfaces'
1376
* @import {AppDispatch} from '#utv/app/store/interfaces'
1377
* @import {AppDispatch} from '#utv/app/store/interfaces'
1377
*/
1378
*/
1379+
1380+
/** @import {Player} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/player/actions/initialization.js‎

Lines changed: 6 additions & 4 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -15,8 +15,8 @@ import {
15

15

16
export const playOnInitialized = () => (
16
export const playOnInitialized = () => (
17
/**
17
/**
18-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
18+
* @param {$Redux.Dispatch<Store.Action>} dispatch
19-
* @param {$Redux.GetState<$UTV.State>} getState
19+
* @param {$Redux.GetState<Store.State>} getState
20
*/
20
*/
21
(dispatch, getState) => {
21
(dispatch, getState) => {
22
const bufferedPlay = getBufferedPlay();
22
const bufferedPlay = getBufferedPlay();
@@ -58,6 +58,8 @@ export * from '../messages/actions';
58

58

59
/**
59
/**
60
* @callback Action
60
* @callback Action
61-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
61+
* @param {$Redux.Dispatch<Store.Action>} dispatch
62-
* @param {$Redux.GetState<$UTV.State>} getState
62+
* @param {$Redux.GetState<Store.State>} getState
63
*/
63
*/
64+
65+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/player/hooks/player-methods.jsx‎

Lines changed: 7 additions & 5 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -11,27 +11,27 @@ export const usePlayerMethods = () => {
11
dispatch(actions.play());
11
dispatch(actions.play());
12
}, [dispatch]);
12
}, [dispatch]);
13

13

14-
/** @type {(options: $UTV.Player.PlayLiveOptions, additionalArgs?: $UTV.Player.PlayAdditionalArgs) => void} */
14+
/** @type {(options: Player.PlayLiveOptions, additionalArgs?: Player.PlayAdditionalArgs) => void} */
15
const playLive = useCallback((options, additionalArgs) => {
15
const playLive = useCallback((options, additionalArgs) => {
16
dispatch(actions.playLive(options, additionalArgs));
16
dispatch(actions.playLive(options, additionalArgs));
17
}, [dispatch]);
17
}, [dispatch]);
18

18

19-
/** @type {(options: $UTV.Player.PlayReplayOptions) => void} */
19+
/** @type {(options: Player.PlayReplayOptions) => void} */
20
const playReplay = useCallback((options) => {
20
const playReplay = useCallback((options) => {
21
dispatch(actions.playReplay(options));
21
dispatch(actions.playReplay(options));
22
}, [dispatch]);
22
}, [dispatch]);
23

23

24-
/** @type {(options: $UTV.Player.PlayRecordingOptions) => void} */
24+
/** @type {(options: Player.PlayRecordingOptions) => void} */
25
const playRecording = useCallback((options) => {
25
const playRecording = useCallback((options) => {
26
dispatch(actions.playRecording(options));
26
dispatch(actions.playRecording(options));
27
}, [dispatch]);
27
}, [dispatch]);
28

28

29-
/** @type {(options: $UTV.Player.PlayVodOptions) => void} */
29+
/** @type {(options: Player.PlayVodOptions) => void} */
30
const playVodMovie = useCallback((options) => {
30
const playVodMovie = useCallback((options) => {
31
dispatch(actions.playVodMovie(options));
31
dispatch(actions.playVodMovie(options));
32
}, [dispatch]);
32
}, [dispatch]);
33

33

34-
/** @type {(options: $UTV.Player.PlayVodOptions) => void} */
34+
/** @type {(options: Player.PlayVodOptions) => void} */
35
const playVodEpisode = useCallback((options) => {
35
const playVodEpisode = useCallback((options) => {
36
dispatch(actions.playVodEpisode(options));
36
dispatch(actions.playVodEpisode(options));
37
}, [dispatch]);
37
}, [dispatch]);
@@ -119,3 +119,5 @@ export const usePlayerMethods = () => {
119
zapPrevious,
119
zapPrevious,
120
};
120
};
121
};
121
};
122+
123+
/** @import {Player} from '#utv/watch/interfaces'; */

‎projects/utv/src/watch/player/messages/actions.js‎

Lines changed: 11 additions & 9 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as souls from './souls';
9

9

10
export const showQualityReducedNotification = () => (
10
export const showQualityReducedNotification = () => (
11
/**
11
/**
12-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
12+
* @param {$Redux.Dispatch<Store.Action>} dispatch
13
*/
13
*/
14
(dispatch) => {
14
(dispatch) => {
15
dispatch(removeAllNotificationsByContent(souls.NOTIFICATION_QUALITY_REDUCED));
15
dispatch(removeAllNotificationsByContent(souls.NOTIFICATION_QUALITY_REDUCED));
@@ -23,7 +23,7 @@ export const showQualityReducedNotification = () => (
23

23

24
export const showLiveUnavailableNotification = () => (
24
export const showLiveUnavailableNotification = () => (
25
/**
25
/**
26-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
26+
* @param {$Redux.Dispatch<Store.Action>} dispatch
27
*/
27
*/
28
(dispatch) => {
28
(dispatch) => {
29
dispatch(setNotification({
29
dispatch(setNotification({
@@ -35,7 +35,7 @@ export const showLiveUnavailableNotification = () => (
35

35

36
export const showContinuousReplayUnavailableNotification = () => (
36
export const showContinuousReplayUnavailableNotification = () => (
37
/**
37
/**
38-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
38+
* @param {$Redux.Dispatch<Store.Action>} dispatch
39
*/
39
*/
40
(dispatch) => {
40
(dispatch) => {
41
dispatch(setNotification({
41
dispatch(setNotification({
@@ -47,7 +47,7 @@ export const showContinuousReplayUnavailableNotification = () => (
47

47

48
export const showContentUnplayableNotification = () => (
48
export const showContentUnplayableNotification = () => (
49
/**
49
/**
50-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
50+
* @param {$Redux.Dispatch<Store.Action>} dispatch
51
*/
51
*/
52
(dispatch) => {
52
(dispatch) => {
53
dispatch(setNotification({
53
dispatch(setNotification({
@@ -59,7 +59,7 @@ export const showContentUnplayableNotification = () => (
59

59

60
export const showPauseUnavailableNotification = () => (
60
export const showPauseUnavailableNotification = () => (
61
/**
61
/**
62-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
62+
* @param {$Redux.Dispatch<Store.Action>} dispatch
63
*/
63
*/
64
(dispatch) => {
64
(dispatch) => {
65
dispatch(setNotification({
65
dispatch(setNotification({
@@ -71,7 +71,7 @@ export const showPauseUnavailableNotification = () => (
71

71

72
export const showSkipBackwardUnavailableNotification = () => (
72
export const showSkipBackwardUnavailableNotification = () => (
73
/**
73
/**
74-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
74+
* @param {$Redux.Dispatch<Store.Action>} dispatch
75
*/
75
*/
76
(dispatch) => {
76
(dispatch) => {
77
dispatch(setNotification({
77
dispatch(setNotification({
@@ -83,7 +83,7 @@ export const showSkipBackwardUnavailableNotification = () => (
83

83

84
export const showSkipForwardUnavailableNotification = () => (
84
export const showSkipForwardUnavailableNotification = () => (
85
/**
85
/**
86-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
86+
* @param {$Redux.Dispatch<Store.Action>} dispatch
87
*/
87
*/
88
(dispatch) => {
88
(dispatch) => {
89
dispatch(setNotification({
89
dispatch(setNotification({
@@ -95,7 +95,7 @@ export const showSkipForwardUnavailableNotification = () => (
95

95

96
export const showSkipForwardLimitedNotification = () => (
96
export const showSkipForwardLimitedNotification = () => (
97
/**
97
/**
98-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
98+
* @param {$Redux.Dispatch<Store.Action>} dispatch
99
*/
99
*/
100
(dispatch) => {
100
(dispatch) => {
101
dispatch(setNotification({
101
dispatch(setNotification({
@@ -107,7 +107,7 @@ export const showSkipForwardLimitedNotification = () => (
107

107

108
export const showSkipBackwardLimitedNotification = () => (
108
export const showSkipBackwardLimitedNotification = () => (
109
/**
109
/**
110-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
110+
* @param {$Redux.Dispatch<Store.Action>} dispatch
111
*/
111
*/
112
(dispatch) => {
112
(dispatch) => {
113
dispatch(setNotification({
113
dispatch(setNotification({
@@ -116,3 +116,5 @@ export const showSkipBackwardLimitedNotification = () => (
116
soul: souls.NOTIFICATION_SKIP_BACKWARD_LIMITED,
116
soul: souls.NOTIFICATION_SKIP_BACKWARD_LIMITED,
117
}));
117
}));
118
});
118
});
119+
120+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/player/program/actions.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {epgApi} from '#utv/discovery/epg/api';
9
*/
9
*/
10
export const fetchProgramWithMarkersHandling = (programId, channel) => (
10
export const fetchProgramWithMarkersHandling = (programId, channel) => (
11
/**
11
/**
12-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
12+
* @param {$Redux.Dispatch<Store.Action>} dispatch
13-
* @param {$Redux.GetState<$UTV.State>} getState
13+
* @param {$Redux.GetState<Store.State>} getState
14
* @returns {Promise<ProgramWithMarkersHandling>}
14
* @returns {Promise<ProgramWithMarkersHandling>}
15
*/
15
*/
16
async (dispatch, getState) => {
16
async (dispatch, getState) => {
@@ -35,3 +35,5 @@ export const fetchProgramWithMarkersHandling = (programId, channel) => (
35
* @prop {$ZAPI.EPG.DetailedCompressedProgramInfo} program
35
* @prop {$ZAPI.EPG.DetailedCompressedProgramInfo} program
36
* @prop {$ZAPI.Channels.MarkerHandlingInfo} markerHandlingInfo
36
* @prop {$ZAPI.Channels.MarkerHandlingInfo} markerHandlingInfo
37
*/
37
*/
38+
39+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/player/interfaces.ts‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
8
} from '@zattoo/playback-sdk-react-native-zapi';
8
} from '@zattoo/playback-sdk-react-native-zapi';
9
import {DetailedCompressedProgramInfo} from '@zattoo/zapi/lib/epg/interfaces';
9
import {DetailedCompressedProgramInfo} from '@zattoo/zapi/lib/epg/interfaces';
10

10

11+
import type {Recordings} from '#utv/user/interfaces';
12+
11
import * as actionTypes from './action-types';
13
import * as actionTypes from './action-types';
12

14

13
export type StreamOptionsWithoutType<T> = Omit<T, 'streamType'>;
15
export type StreamOptionsWithoutType<T> = Omit<T, 'streamType'>;
@@ -19,7 +21,7 @@ export interface ProgramDescriptorWithID {
19
streamingProgram?: DetailedCompressedProgramInfo;
21
streamingProgram?: DetailedCompressedProgramInfo;
20
movie?: $ZAPI.VOD.Movie;
22
movie?: $ZAPI.VOD.Movie;
21
episode?: $ZAPI.VOD.Episode;
23
episode?: $ZAPI.VOD.Episode;
22-
recording?: $UTV.Recordings.RecordingInfo;
24+
recording?: Recordings.RecordingInfo;
23
isPinApplied?: boolean;
25
isPinApplied?: boolean;
24
videoToken?: string; // for VOD content, used for tracking
26
videoToken?: string; // for VOD content, used for tracking
25
isContinuous?: boolean; // for continuous playback
27
isContinuous?: boolean; // for continuous playback

‎projects/utv/src/watch/player/middleware.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -17,7 +17,7 @@ import * as actions from './actions';
17
import {playOnInitialized} from './actions/initialization';
17
import {playOnInitialized} from './actions/initialization';
18
import * as playerState from './state';
18
import * as playerState from './state';
19

19

20-
/** @type {$Redux.Middleware<$UTV.Action, $UTV.State>} */
20+
/** @type {$Redux.Middleware<Store.Action, Store.State>} */
21
export const playerMiddleware = ({
21
export const playerMiddleware = ({
22
dispatch, getState,
22
dispatch, getState,
23
}) => (next) => (action) => {
23
}) => (next) => (action) => {
@@ -136,3 +136,5 @@ export const playerMiddleware = ({
136
return next(action);
136
return next(action);
137
}
137
}
138
};
138
};
139+
140+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/player/reducer.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as actionTypes from './action-types';
4

4

5
const INITIAL_STATE = {};
5
const INITIAL_STATE = {};
6

6

7-
/** @type {$Redux.Reducer<$UTV.Watch.Player.State, $UTV.Watch.Player.Action>} */
7+
/** @type {$Redux.Reducer<Player.State, Player.Action>} */
8
export const player = (state = INITIAL_STATE, action) => {
8
export const player = (state = INITIAL_STATE, action) => {
9
switch (action.type) {
9
switch (action.type) {
10
case actionTypes.PLAYER_SET_DATA:
10
case actionTypes.PLAYER_SET_DATA:
@@ -37,3 +37,5 @@ export const player = (state = INITIAL_STATE, action) => {
37
return state;
37
return state;
38
}
38
}
39
};
39
};
40+
41+
/** @import {Player} from '#utv/watch/interfaces'; */
Lines changed: 79 additions & 74 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Large diffs are not rendered by default.

‎projects/utv/src/watch/player/utils.js‎

Lines changed: 9 additions & 5 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -31,11 +31,11 @@ const NON_LINEAR_STREAM_TYPES = [
31

31

32
/**
32
/**
33
* @param {$Playback.UTVPlayerEventData} data
33
* @param {$Playback.UTVPlayerEventData} data
34-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
34+
* @param {$Redux.Dispatch<Store.Action>} dispatch
35
*/
35
*/
36
export const navigateToStreamData = (data, dispatch) => {
36
export const navigateToStreamData = (data, dispatch) => {
37-
/** @type {$UTV.Watch.Player.ProgramDescriptorWithID} */
37+
/** @type {Player.ProgramDescriptorWithID} */
38-
const descriptor = /** @type {$UTV.Watch.Player.ProgramDescriptorWithID} */ (
38+
const descriptor = /** @type {Player.ProgramDescriptorWithID} */ (
39
data.state?.stream?.programDescriptor
39
data.state?.stream?.programDescriptor
40
);
40
);
41

41

@@ -102,6 +102,10 @@ export const isStreamPage = (routeName) => {
102
return routeName === WATCH_PAGE;
102
return routeName === WATCH_PAGE;
103
};
103
};
104

104

105-
/** @typedef {$ZAPI.EPG.DetailedCompressedProgramInfo} DetailedCompressedProgramInfo */
105+
/**
106+
* @import {Store} from '#utv/app/interfaces'
107+
* @import {NavigationState} from '@react-navigation/core';
108+
* @import {Player} from '#utv/watch/interfaces';
109+
*/
106

110

107-
/** @import {NavigationState} from '@react-navigation/core'; */
111+
/** @typedef {$ZAPI.EPG.DetailedCompressedProgramInfo} DetailedCompressedProgramInfo */

‎projects/utv/src/watch/stream/channel/middleware.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as storageActions from '#utv/app/storage/actions';
4
import * as StorageKey from './storage-keys';
4
import * as StorageKey from './storage-keys';
5

5

6
/**
6
/**
7-
* @type {$Redux.Middleware<$UTV.Action, $UTV.State>}
7+
* @type {$Redux.Middleware<Store.Action, Store.State>}
8
*/
8
*/
9
export const channel = ({dispatch}) => (next) => (action) => {
9
export const channel = ({dispatch}) => (next) => (action) => {
10
switch (action.type) {
10
switch (action.type) {
@@ -18,3 +18,5 @@ export const channel = ({dispatch}) => (next) => (action) => {
18
return next(action);
18
return next(action);
19
}
19
}
20
};
20
};
21+
22+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/channel/state.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {selectWatchState} from '#utv/app/store/domains/state';
7
/**
7
/**
8
* Returns the first available channel ID
8
* Returns the first available channel ID
9
*
9
*
10-
* @param {$UTV.State} state
10+
* @param {Store.State} state
11
* @returns {string}
11
* @returns {string}
12
*/
12
*/
13
export const defaultChannelId = (state) => {
13
export const defaultChannelId = (state) => {
@@ -26,7 +26,7 @@ export const defaultChannelId = (state) => {
26
* Returns available channel ID. If there is no channel saved to stream yet,
26
* Returns available channel ID. If there is no channel saved to stream yet,
27
* it returns the default channel ID
27
* it returns the default channel ID
28
*
28
*
29-
* @param {$UTV.State} state
29+
* @param {Store.State} state
30
* @returns {string}
30
* @returns {string}
31
*/
31
*/
32
export const currentOrDefaultChannelId = (state) => {
32
export const currentOrDefaultChannelId = (state) => {
@@ -39,3 +39,5 @@ export const currentOrDefaultChannelId = (state) => {
39

39

40
return defaultChannelId(state);
40
return defaultChannelId(state);
41
};
41
};
42+
43+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/flags/program-time/utils.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {FlagType} from '#utv/ui/flag/orchestrator/enums';
4
* @param {number} startTime
4
* @param {number} startTime
5
* @param {number} endTime
5
* @param {number} endTime
6
* @param {boolean} [isAiring]
6
* @param {boolean} [isAiring]
7-
* @returns {$UTV.UI.Flag.Flags.ProgramTime}
7+
* @returns {Flag.Flags.ProgramTime}
8
*/
8
*/
9
export const getProgramTimeFlag = (startTime, endTime, isAiring = false) => {
9
export const getProgramTimeFlag = (startTime, endTime, isAiring = false) => {
10
if (!Number.isFinite(startTime) || startTime > endTime) {
10
if (!Number.isFinite(startTime) || startTime > endTime) {
@@ -24,7 +24,7 @@ export const getProgramTimeFlag = (startTime, endTime, isAiring = false) => {
24
/**
24
/**
25
* @param {number} startTime
25
* @param {number} startTime
26
* @param {number} endTime
26
* @param {number} endTime
27-
* @returns {$UTV.UI.Flag.Flags.ProgramTimeDuration}
27+
* @returns {Flag.Flags.ProgramTimeDuration}
28
*/
28
*/
29
export const getProgramTimeDurationFlag = (startTime, endTime) => {
29
export const getProgramTimeDurationFlag = (startTime, endTime) => {
30
if (!Number.isFinite(startTime) || startTime > endTime) {
30
if (!Number.isFinite(startTime) || startTime > endTime) {
@@ -39,3 +39,5 @@ export const getProgramTimeDurationFlag = (startTime, endTime) => {
39
},
39
},
40
});
40
});
41
};
41
};
42+
43+
/** @import {Flag} from '#utv/ui/interfaces'; */

‎projects/utv/src/watch/stream/flags/utils.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
14
* @param {$Playback.UTVPlayerStreamType} streamType
14
* @param {$Playback.UTVPlayerStreamType} streamType
15
* @param {number} startTime
15
* @param {number} startTime
16
* @param {number} endTime
16
* @param {number} endTime
17-
* @returns {$UTV.UI.Flag.OrchestratorFlagConfig[]}
17+
* @returns {Flag.OrchestratorFlagConfig[]}
18
*/
18
*/
19
export const getFlagsConfigByStream = (streamType, startTime, endTime) => {
19
export const getFlagsConfigByStream = (streamType, startTime, endTime) => {
20-
/** @type {$UTV.UI.Flag.OrchestratorFlagConfig} */
20+
/** @type {Flag.OrchestratorFlagConfig} */
21
const streamFlagConfig = {
21
const streamFlagConfig = {
22
flagType: FlagType.STREAM_TYPE,
22
flagType: FlagType.STREAM_TYPE,
23
props: {streamType},
23
props: {streamType},
@@ -70,3 +70,5 @@ export const getFlagsConfigByStream = (streamType, startTime, endTime) => {
70
return [];
70
return [];
71
}
71
}
72
};
72
};
73+
74+
/** @import {Flag} from '#utv/ui/interfaces'; */

‎projects/utv/src/watch/stream/layout/actions.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {pause} from '#utv/watch/player/actions';
10

10

11
export const openDetails = () => (
11
export const openDetails = () => (
12
/**
12
/**
13-
* @param {$Redux.Dispatch<$UTV.Action>} dispatch
13+
* @param {$Redux.Dispatch<Store.Action>} dispatch
14-
* @param {$Redux.GetState<$UTV.State>} getState
14+
* @param {$Redux.GetState<Store.State>} getState
15
*/
15
*/
16
(dispatch, getState) => {
16
(dispatch, getState) => {
17
const state = getState();
17
const state = getState();
@@ -45,3 +45,5 @@ export const openDetails = () => (
45
}
45
}
46
}
46
}
47
);
47
);
48+
49+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/layout/hooks.jsx‎

Lines changed: 9 additions & 4 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const useStreamKeyHandler = (disabled, removeEnter, onAnyKey) => {
39
zapPrevious,
39
zapPrevious,
40
} = usePlayerMethods();
40
} = usePlayerMethods();
41

41

42-
/** @type {$UTV.NCE.NCECallback} */
42+
/** @type {NCE.NCECallback} */
43
const onNumericChannelEntry = useCallback((channel) => {
43
const onNumericChannelEntry = useCallback((channel) => {
44
dispatch(zapNumeric(channel));
44
dispatch(zapNumeric(channel));
45
}, [dispatch]);
45
}, [dispatch]);
@@ -74,7 +74,7 @@ export const useStreamKeyHandler = (disabled, removeEnter, onAnyKey) => {
74
}, [seekBackward]);
74
}, [seekBackward]);
75

75

76
/**
76
/**
77-
* @type {$UTV.KeyHandler.KeyMap}
77+
* @type {KeyHandler.KeyMap}
78
*/
78
*/
79
const baseKeyMap = useMemo(() => ({
79
const baseKeyMap = useMemo(() => ({
80
[Keys.BACKWARD]: handleSeekBackward,
80
[Keys.BACKWARD]: handleSeekBackward,
@@ -110,14 +110,14 @@ export const useStreamKeyHandler = (disabled, removeEnter, onAnyKey) => {
110
]);
110
]);
111

111

112
/**
112
/**
113-
* @type {$UTV.KeyHandler.KeyMap}
113+
* @type {KeyHandler.KeyMap}
114
*/
114
*/
115
const imaAdPlaybackKeyMap = useMemo(() => ({
115
const imaAdPlaybackKeyMap = useMemo(() => ({
116
[Keys.ENTER]: requestAdSkip,
116
[Keys.ENTER]: requestAdSkip,
117
[Keys.RIGHT]: openChannelList,
117
[Keys.RIGHT]: openChannelList,
118
}), [openChannelList, requestAdSkip]);
118
}), [openChannelList, requestAdSkip]);
119

119

120-
/** @type {$UTV.KeyHandler.KeyMapOptions} */
120+
/** @type {KeyHandler.KeyMapOptions} */
121
const keyMapOptions = useMemo(() => {
121
const keyMapOptions = useMemo(() => {
122
const resultKeyMap = {...isAdPlayback ? imaAdPlaybackKeyMap : baseKeyMap};
122
const resultKeyMap = {...isAdPlayback ? imaAdPlaybackKeyMap : baseKeyMap};
123

123

@@ -160,3 +160,8 @@ export const useStreamKeyHandler = (disabled, removeEnter, onAnyKey) => {
160
useNumericChannelEntry(onNumericChannelEntry, disabled);
160
useNumericChannelEntry(onNumericChannelEntry, disabled);
161
useKeyHandler(keyMapOptions, disabled);
161
useKeyHandler(keyMapOptions, disabled);
162
};
162
};
163+
164+
/**
165+
* @import {NCE} from '#utv/watch/interfaces';
166+
* @import {KeyHandler} from '#utv/app/interfaces';
167+
*/

‎projects/utv/src/watch/stream/meta/state.js‎

Lines changed: 8 additions & 6 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {getEpisodeString} from '#utv/discovery/details/metadata/utils';
9
import * as playerState from '#utv/watch/player/state';
9
import * as playerState from '#utv/watch/player/state';
10

10

11
/**
11
/**
12-
* @param {$UTV.State} state
12+
* @param {Store.State} state
13
* @returns {string}
13
* @returns {string}
14
*/
14
*/
15
export const streamTitle = (state) => {
15
export const streamTitle = (state) => {
@@ -35,7 +35,7 @@ export const streamTitle = (state) => {
35
};
35
};
36

36

37
/**
37
/**
38-
* @param {$UTV.State} state
38+
* @param {Store.State} state
39
* @returns {string}
39
* @returns {string}
40
*/
40
*/
41
export const streamSubtitle = (state) => {
41
export const streamSubtitle = (state) => {
@@ -63,7 +63,7 @@ export const streamSubtitle = (state) => {
63
};
63
};
64

64

65
/**
65
/**
66-
* @param {$UTV.State} state
66+
* @param {Store.State} state
67
* @returns {string}
67
* @returns {string}
68
*/
68
*/
69
export const logoToken = (state) => {
69
export const logoToken = (state) => {
@@ -91,7 +91,7 @@ export const logoToken = (state) => {
91
};
91
};
92

92

93
/**
93
/**
94-
* @param {$UTV.State} state
94+
* @param {Store.State} state
95
* @returns {number} Start time in seconds
95
* @returns {number} Start time in seconds
96
*/
96
*/
97
export const streamStart = (state) => {
97
export const streamStart = (state) => {
@@ -116,7 +116,7 @@ export const streamStart = (state) => {
116
};
116
};
117

117

118
/**
118
/**
119-
* @param {$UTV.State} state
119+
* @param {Store.State} state
120
* @returns {number} End time in seconds
120
* @returns {number} End time in seconds
121
*/
121
*/
122
export const streamEnd = (state) => {
122
export const streamEnd = (state) => {
@@ -144,7 +144,7 @@ export const streamEnd = (state) => {
144
};
144
};
145

145

146
/**
146
/**
147-
* @param {$UTV.State} state
147+
* @param {Store.State} state
148
* @returns {number}
148
* @returns {number}
149
*/
149
*/
150
export const channelNumber = (state) => {
150
export const channelNumber = (state) => {
@@ -174,3 +174,5 @@ export const channelNumber = (state) => {
174
* @prop {number} streamEnd - End time in seconds
174
* @prop {number} streamEnd - End time in seconds
175
* @prop {number} channelNumber - only available for linear content
175
* @prop {number} channelNumber - only available for linear content
176
*/
176
*/
177+
178+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/pin/middleware.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
15
import * as souls from './souls';
15
import * as souls from './souls';
16

16

17
/**
17
/**
18-
* @type {$Redux.Middleware<$UTV.Action, $UTV.State>}
18+
* @type {$Redux.Middleware<Store.Action, Store.State>}
19
*/
19
*/
20
const pinMiddleware = ({
20
const pinMiddleware = ({
21
dispatch,
21
dispatch,
@@ -65,3 +65,5 @@ export const pin = [
65
pinMiddleware,
65
pinMiddleware,
66
libPinMiddleware,
66
libPinMiddleware,
67
];
67
];
68+
69+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/program/state.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -7,11 +7,13 @@ import * as playerState from '#utv/watch/player/state';
7
* Returns active program. If there is no program saved to stream yet,
7
* Returns active program. If there is no program saved to stream yet,
8
* it returns the program of the default channel
8
* it returns the program of the default channel
9
*
9
*
10-
* @param {$UTV.State} state
10+
* @param {Store.State} state
11
* @returns {$ZAPI.EPG.DetailedCompressedProgramInfo}
11
* @returns {$ZAPI.EPG.DetailedCompressedProgramInfo}
12
*/
12
*/
13
export const currentOrDefaultProgram = (state) => {
13
export const currentOrDefaultProgram = (state) => {
14
const defaultChannelId = channelState.defaultChannelId(state);
14
const defaultChannelId = channelState.defaultChannelId(state);
15

15

16
return playerState.streamingProgram(state) || epgState.liveProgram(state, defaultChannelId);
16
return playerState.streamingProgram(state) || epgState.liveProgram(state, defaultChannelId);
17
};
17
};
18+
19+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/recordings/middleware.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as playerState from '#utv/watch/player/state';
5
import * as playerActions from '#utv/watch/player/actions';
5
import * as playerActions from '#utv/watch/player/actions';
6
import {NPVR_PLAYLIST_RECEIVED} from '#utv/user/recordings/action-types';
6
import {NPVR_PLAYLIST_RECEIVED} from '#utv/user/recordings/action-types';
7

7

8-
/** @type {$Redux.Middleware<$UTV.Action, $UTV.State>} */
8+
/** @type {$Redux.Middleware<Store.Action, Store.State>} */
9
export const recordings = ({
9
export const recordings = ({
10
dispatch, getState,
10
dispatch, getState,
11
}) => (next) => (action) => {
11
}) => (next) => (action) => {
@@ -64,3 +64,5 @@ export const recordings = ({
64
return next(action);
64
return next(action);
65
}
65
}
66
};
66
};
67+
68+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/stream/vod/middleware.js‎

Lines changed: 3 additions & 1 deletion
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {Funnel} from '#utv/app/context/enums';
4
import * as playerState from '#utv/watch/player/state';
4
import * as playerState from '#utv/watch/player/state';
5
import * as playerActions from '#utv/watch/player/actions';
5
import * as playerActions from '#utv/watch/player/actions';
6

6

7-
/** @type {$Redux.Middleware<$UTV.Action, $UTV.State>} */
7+
/** @type {$Redux.Middleware<Store.Action, Store.State>} */
8
export const vod = ({
8
export const vod = ({
9
dispatch, getState,
9
dispatch, getState,
10
}) => (next) => (action) => {
10
}) => (next) => (action) => {
@@ -46,3 +46,5 @@ export const vod = ({
46
return next(action);
46
return next(action);
47
}
47
}
48
};
48
};
49+
50+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/src/watch/slice.js‎

Lines changed: 5 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const createMiddleware = () => {
28
return middleware;
28
return middleware;
29
};
29
};
30

30

31-
/** @type {$Redux.Reducer<$UTV.Watch.State>} */
31+
/** @type {$Redux.Reducer<State>} */
32
export const reducer = combineReducers({
32
export const reducer = combineReducers({
33
channels: channelsSlice.reducer,
33
channels: channelsSlice.reducer,
34
player,
34
player,
@@ -40,4 +40,7 @@ export const apiReducers = {
40
// [watchApi.reducerPath]: watchApi.reducer,
40
// [watchApi.reducerPath]: watchApi.reducer,
41
};
41
};
42

42

43-
/** @import {Middleware} from '@reduxjs/toolkit' */
43+
/**
44+
* @import {Middleware} from '@reduxjs/toolkit'
45+
* @import {State} from '#utv/watch/interfaces';
46+
*/

‎projects/utv/units/watch/channels/slice.test.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -60,7 +60,7 @@ const nonFavoriteTitle = mockChannels.channel15.title;
60
/**
60
/**
61
* @param {UTVPlayerEvents} event
61
* @param {UTVPlayerEvents} event
62
* @param {string} channelId
62
* @param {string} channelId
63-
* @returns {$UTV.Player.Actions.SetPlayerData}
63+
* @returns {Player.Actions.SetPlayerData}
64
*/
64
*/
65
const createPlayerDataAction = (event, channelId) => setPlayerData({
65
const createPlayerDataAction = (event, channelId) => setPlayerData({
66
event,
66
event,
@@ -76,7 +76,7 @@ const createPlayerDataAction = (event, channelId) => setPlayerData({
76

76

77
/**
77
/**
78
* @param {string} channelId
78
* @param {string} channelId
79-
* @returns {$UTV.Player.Actions.SetPlayerData}
79+
* @returns {Player.Actions.SetPlayerData}
80
*/
80
*/
81
const createPlayRequestedAction = (channelId) => createPlayerDataAction(UTVPlayerEvents.PLAY_REQUESTED, channelId);
81
const createPlayRequestedAction = (channelId) => createPlayerDataAction(UTVPlayerEvents.PLAY_REQUESTED, channelId);
82

82

@@ -402,3 +402,5 @@ describe('Channels slice listeners', () => {
402
});
402
});
403
});
403
});
404
});
404
});
405+
406+
/** @import {Player} from '#utv/watch/interfaces'; */

‎projects/utv/units/watch/player/actions/index.test.js‎

Lines changed: 25 additions & 20 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -92,7 +92,7 @@ jest.mock('#utv/watch/player/state', () => ({
92
const originalPlayerApi = PlayerApi.current;
92
const originalPlayerApi = PlayerApi.current;
93

93

94
describe('Replay', () => {
94
describe('Replay', () => {
95-
/** @type {() => $UTV.State} */
95+
/** @type {() => Store.State} */
96
let getState;
96
let getState;
97

97

98
/** @type {$Redux.Dispatch} */
98
/** @type {$Redux.Dispatch} */
@@ -108,7 +108,7 @@ describe('Replay', () => {
108
let broadcastPositionSpy;
108
let broadcastPositionSpy;
109

109

110
beforeEach(() => {
110
beforeEach(() => {
111-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
111+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
112
dispatch = jest.fn().mockImplementation((fn) => fn(dispatch, getState));
112
dispatch = jest.fn().mockImplementation((fn) => fn(dispatch, getState));
113

113

114
jest.spyOn(channelsLibState, 'getChannelById').mockReturnValue(MOCK_CHANNEL);
114
jest.spyOn(channelsLibState, 'getChannelById').mockReturnValue(MOCK_CHANNEL);
@@ -134,7 +134,7 @@ describe('Replay', () => {
134
jest.resetAllMocks();
134
jest.resetAllMocks();
135
});
135
});
136

136

137-
/** @type {$UTV.Player.PlayReplayOptions} */
137+
/** @type {Player.PlayReplayOptions} */
138
const defaultOptions = {
138
const defaultOptions = {
139
channelId: MOCK_CHANNEL.cid,
139
channelId: MOCK_CHANNEL.cid,
140
programId: MOCK_PROGRAM.id,
140
programId: MOCK_PROGRAM.id,
@@ -177,7 +177,7 @@ describe('Replay', () => {
177
});
177
});
178

178

179
it('should pass correct parameters to PlayerApi.play', async () => {
179
it('should pass correct parameters to PlayerApi.play', async () => {
180-
/** @type {$UTV.Player.PlayReplayOptions} */
180+
/** @type {Player.PlayReplayOptions} */
181
const options = {
181
const options = {
182
startPositionMs: MOCK_START_POSITION_MS,
182
startPositionMs: MOCK_START_POSITION_MS,
183
...defaultOptions,
183
...defaultOptions,
@@ -220,7 +220,7 @@ describe('Replay', () => {
220
});
220
});
221

221

222
describe('Live', () => {
222
describe('Live', () => {
223-
/** @type {() => $UTV.State} */
223+
/** @type {() => Store.State} */
224
let getState;
224
let getState;
225

225

226
/** @type {$Redux.Dispatch} */
226
/** @type {$Redux.Dispatch} */
@@ -229,13 +229,13 @@ describe('Live', () => {
229
/** @type {jest.SpyInstance} */
229
/** @type {jest.SpyInstance} */
230
let trackSpy;
230
let trackSpy;
231

231

232-
/** @type {$UTV.Player.PlayLiveOptions} */
232+
/** @type {Player.PlayLiveOptions} */
233
const defaultOptions = {
233
const defaultOptions = {
234
channelId: MOCK_CHANNEL.cid,
234
channelId: MOCK_CHANNEL.cid,
235
};
235
};
236

236

237
beforeEach(() => {
237
beforeEach(() => {
238-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
238+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
239
dispatch = jest.fn().mockImplementation((fn) => {
239
dispatch = jest.fn().mockImplementation((fn) => {
240
if (typeof fn === 'function') {
240
if (typeof fn === 'function') {
241
return fn(dispatch, getState);
241
return fn(dispatch, getState);
@@ -322,7 +322,7 @@ describe('Live', () => {
322
});
322
});
323

323

324
describe('zapNumeric', () => {
324
describe('zapNumeric', () => {
325-
/** @type {() => $UTV.State} */
325+
/** @type {() => Store.State} */
326
let getState;
326
let getState;
327

327

328
/** @type {$Redux.Dispatch} */
328
/** @type {$Redux.Dispatch} */
@@ -335,7 +335,7 @@ describe('zapNumeric', () => {
335
let triggerChannelNotFoundNotificationSpy;
335
let triggerChannelNotFoundNotificationSpy;
336

336

337
beforeEach(() => {
337
beforeEach(() => {
338-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
338+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
339
dispatch = jest.fn().mockImplementation((fn) => {
339
dispatch = jest.fn().mockImplementation((fn) => {
340
if (typeof fn === 'function') {
340
if (typeof fn === 'function') {
341
return fn(dispatch, getState);
341
return fn(dispatch, getState);
@@ -399,7 +399,7 @@ describe('zapNumeric', () => {
399
});
399
});
400

400

401
describe('navigateToStream', () => {
401
describe('navigateToStream', () => {
402-
/** @type {() => $UTV.State} */
402+
/** @type {() => Store.State} */
403
let getState;
403
let getState;
404

404

405
/** @type {$Redux.Dispatch} */
405
/** @type {$Redux.Dispatch} */
@@ -415,7 +415,7 @@ describe('navigateToStream', () => {
415
let navigationRefGetCurrentRouteSpy;
415
let navigationRefGetCurrentRouteSpy;
416

416

417
beforeEach(() => {
417
beforeEach(() => {
418-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
418+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
419
dispatch = jest.fn().mockImplementation((fn) => {
419
dispatch = jest.fn().mockImplementation((fn) => {
420
if (typeof fn === 'function') {
420
if (typeof fn === 'function') {
421
return fn(dispatch, getState);
421
return fn(dispatch, getState);
@@ -442,7 +442,7 @@ describe('navigateToStream', () => {
442
jest.resetAllMocks();
442
jest.resetAllMocks();
443
});
443
});
444

444

445-
/** @type {$UTV.Player.StreamPathData} */
445+
/** @type {Player.StreamPathData} */
446
const mockStreamData = {
446
const mockStreamData = {
447
channelId: MOCK_CHANNEL.cid,
447
channelId: MOCK_CHANNEL.cid,
448
programId: MOCK_PROGRAM.id,
448
programId: MOCK_PROGRAM.id,
@@ -684,7 +684,7 @@ describe('navigateToStream', () => {
684
});
684
});
685

685

686
describe('navigateOnStreamStop', () => {
686
describe('navigateOnStreamStop', () => {
687-
/** @type {() => $UTV.State} */
687+
/** @type {() => Store.State} */
688
let getState;
688
let getState;
689

689

690
/** @type {$Redux.Dispatch} */
690
/** @type {$Redux.Dispatch} */
@@ -703,7 +703,7 @@ describe('navigateOnStreamStop', () => {
703
let isPlayerRouteActiveSpy;
703
let isPlayerRouteActiveSpy;
704

704

705
beforeEach(() => {
705
beforeEach(() => {
706-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
706+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
707
dispatch = jest.fn().mockImplementation((fn) => {
707
dispatch = jest.fn().mockImplementation((fn) => {
708
if (typeof fn === 'function') {
708
if (typeof fn === 'function') {
709
return fn(dispatch, getState);
709
return fn(dispatch, getState);
@@ -909,11 +909,11 @@ describe('navigateOnStreamStop', () => {
909
});
909
});
910

910

911
describe('isPlaybackActiveOrPlayRequested', () => {
911
describe('isPlaybackActiveOrPlayRequested', () => {
912-
/** @type {() => $UTV.State} */
912+
/** @type {() => Store.State} */
913
let getState;
913
let getState;
914

914

915
beforeEach(() => {
915
beforeEach(() => {
916-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
916+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
917
/** @type {jest.Mock} */ (playerState.isInitialized).mockReturnValue(true);
917
/** @type {jest.Mock} */ (playerState.isInitialized).mockReturnValue(true);
918
});
918
});
919

919

@@ -962,15 +962,15 @@ describe('isPlaybackActiveOrPlayRequested', () => {
962
});
962
});
963

963

964
describe('pauseOrStopPlayback', () => {
964
describe('pauseOrStopPlayback', () => {
965-
/** @type {() => $UTV.State} */
965+
/** @type {() => Store.State} */
966
let getState;
966
let getState;
967
/** @type {$Redux.Dispatch} */
967
/** @type {$Redux.Dispatch} */
968
let dispatch;
968
let dispatch;
969
/** @type {jest.SpyInstance} */
969
/** @type {jest.SpyInstance} */
970
let canPauseSpy;
970
let canPauseSpy;
971

971

972
beforeEach(() => {
972
beforeEach(() => {
973-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
973+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
974
dispatch = jest.fn().mockImplementation((fn) => (typeof fn === 'function' ? fn(dispatch, getState) : fn));
974
dispatch = jest.fn().mockImplementation((fn) => (typeof fn === 'function' ? fn(dispatch, getState) : fn));
975

975

976
canPauseSpy = jest.spyOn(playerState, 'canPause');
976
canPauseSpy = jest.spyOn(playerState, 'canPause');
@@ -1013,13 +1013,13 @@ describe('pauseOrStopPlayback', () => {
1013
});
1013
});
1014

1014

1015
describe('Deeplink actions', () => {
1015
describe('Deeplink actions', () => {
1016-
/** @type {() => $UTV.State} */
1016+
/** @type {() => Store.State} */
1017
let getState;
1017
let getState;
1018
/** @type {$Redux.Dispatch} */
1018
/** @type {$Redux.Dispatch} */
1019
let dispatch;
1019
let dispatch;
1020

1020

1021
beforeEach(() => {
1021
beforeEach(() => {
1022-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
1022+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
1023
dispatch = jest.fn();
1023
dispatch = jest.fn();
1024

1024

1025
// Mock common player state functions
1025
// Mock common player state functions
@@ -1355,3 +1355,8 @@ describe('Seek actions', () => {
1355
});
1355
});
1356
});
1356
});
1357
});
1357
});
1358+
1359+
/**
1360+
* @import {Store} from '#utv/app/interfaces'
1361+
* @import {Player} from '#utv/watch/interfaces'
1362+
*/

‎projects/utv/units/watch/player/actions/initialization.test.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -50,7 +50,7 @@ jest.mock('#utv/watch/player/state', () => ({
50
}));
50
}));
51

51

52
describe('playOnInitialized', () => {
52
describe('playOnInitialized', () => {
53-
/** @type {() => $UTV.State} */
53+
/** @type {() => Store.State} */
54
let getState;
54
let getState;
55

55

56
/** @type {$Redux.Dispatch} */
56
/** @type {$Redux.Dispatch} */
@@ -75,7 +75,7 @@ describe('playOnInitialized', () => {
75
let playLiveSpy;
75
let playLiveSpy;
76

76

77
beforeEach(() => {
77
beforeEach(() => {
78-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
78+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
79

79

80
dispatch = jest.fn().mockImplementation((fn) => {
80
dispatch = jest.fn().mockImplementation((fn) => {
81
if (typeof fn === 'function') {
81
if (typeof fn === 'function') {
@@ -207,3 +207,5 @@ describe('playOnInitialized', () => {
207
});
207
});
208
});
208
});
209
});
209
});
210+
211+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/units/watch/player/program/actions.test.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -40,7 +40,7 @@ const MOCK_MARKER_HANDLING_INFO = {
40
};
40
};
41

41

42
describe('fetchProgramWithMarkersHandling', () => {
42
describe('fetchProgramWithMarkersHandling', () => {
43-
/** @type {() => $UTV.State} */
43+
/** @type {() => Store.State} */
44
let getState;
44
let getState;
45

45

46
/** @type {$Redux.Dispatch} */
46
/** @type {$Redux.Dispatch} */
@@ -52,7 +52,7 @@ describe('fetchProgramWithMarkersHandling', () => {
52
let fetchBroadcastSpy;
52
let fetchBroadcastSpy;
53

53

54
beforeEach(() => {
54
beforeEach(() => {
55-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
55+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
56
dispatch = jest.fn().mockImplementation((fn) => {
56
dispatch = jest.fn().mockImplementation((fn) => {
57
if (typeof fn === 'function') {
57
if (typeof fn === 'function') {
58
return fn(dispatch, getState);
58
return fn(dispatch, getState);
@@ -91,3 +91,5 @@ describe('fetchProgramWithMarkersHandling', () => {
91
});
91
});
92
});
92
});
93
});
93
});
94+
95+
/** @import {Store} from '#utv/app/interfaces' */

‎projects/utv/units/watch/stream/layout/actions.test.js‎

Lines changed: 4 additions & 2 deletions
jmvillagra ✓ undrafted nadzeyakzattoo
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -33,7 +33,7 @@ jest.mock('#utv/watch/player/state', () => ({
33
}));
33
}));
34

34

35
describe('Layout Actions', () => {
35
describe('Layout Actions', () => {
36-
/** @type {() => $UTV.State} */
36+
/** @type {() => Store.State} */
37
let getState;
37
let getState;
38

38

39
/** @type {$Redux.Dispatch} */
39
/** @type {$Redux.Dispatch} */
@@ -48,7 +48,7 @@ describe('Layout Actions', () => {
48
beforeEach(() => {
48
beforeEach(() => {
49
mockPause = /** @type {jest.Mock} */ (pause);
49
mockPause = /** @type {jest.Mock} */ (pause);
50
mockNavigate = /** @type {jest.Mock} */ (navigationRef.navigate);
50
mockNavigate = /** @type {jest.Mock} */ (navigationRef.navigate);
51-
getState = jest.fn(() => (/** @type {$UTV.State} */ ({})));
51+
getState = jest.fn(() => (/** @type {Store.State} */ ({})));
52
dispatch = jest.fn().mockImplementation((fn) => {
52
dispatch = jest.fn().mockImplementation((fn) => {
53
if (typeof fn === 'function') {
53
if (typeof fn === 'function') {
54
return fn(dispatch, getState);
54
return fn(dispatch, getState);
@@ -102,3 +102,5 @@ describe('Layout Actions', () => {
102
/**
102
/**
103
* @typedef {jest.MockedFunction<(fn: () => object) => void>} MockDispatch
103
* @typedef {jest.MockedFunction<(fn: () => object) => void>} MockDispatch
104
*/
104
*/
105+
106+
/** @import {Store} from '#utv/app/interfaces' */
GIF of two octocats high fiving each otherTwo octocatsTwo octocats high fiving each other
You made it to the end!